package com.t213.smbms.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.t213.smbms.entity.Bill;
import com.t213.smbms.mapper.BillMapper;
import com.t213.smbms.service.BillService;
@Service("billService")
public class BillServiceimpl implements BillService {

	@Autowired
	private BillMapper billMapper;
	

	
	public void setBillMapper(BillMapper billMapper) {
		this.billMapper = billMapper;
	}


	@Override
	public List<Bill> findBill() {
		return billMapper.find();
	}


	@Override
	public List<Bill> findinfo(int id) {
		return billMapper.get(id);
	}


	@Override
	public int upbill(Bill bill) {
		return billMapper.update(bill);
	}


	@Override
	public int deletebill(int id) {
		return billMapper.delete(id);
	}


	@Override
	public int findcode(String billcode) {
		return billMapper.findstr(billcode);
	}


	@Override
	public int add(Bill bill) {
		return billMapper.add(bill);
	}


	@Override
	public List<Bill> finwh(Bill bill) {
		return billMapper.wherefind(bill);
	}

	

}
